<?php

namespace app\model\store;

use think\Model;

class GoodsCate extends Model
{

    public function parent(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(GoodsCate::class, 'pid');
    }

    public function children(): \think\model\relation\HasMany
    {
        return $this->hasMany(GoodsCate::class, 'pid');
    }
}
